<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/

Route::get('/', function () {
	return view('welcome');
});

Route::get('/add','XXController@add');
Route::get('/up','XXController@up');
Route::get('/del','XXController@del');
Route::get('/show','XXController@show');

//留言板
Route::get('/msg/index','MsgController@index');     //展示留言板
Route::get('/msg/add','MsgController@add');         //展示表单
Route::post('/msg/add','MsgController@addPost');    //添加数据
Route::get('/msg/del/{id}','MsgController@del');    //删除留言
Route::match(['get','post'],'/msg/up/{id}','MsgController@up');//修改留言


//用户注册于登录
Route::any('/admin/reg','AdminController@reg'); 
Route::match(['get','post'],'/admin/login','AdminController@login'); 



Route::get('/home', 'IndexController@index');
// 认证路由...
Route::get('auth/login', 'Auth\AuthController@getLogin');
Route::post('auth/login', 'Auth\AuthController@postLogin');
Route::get('auth/logout', 'Auth\AuthController@getLogout');
//验证码
Route::get('kit/captcha/{tmp}', 'KitController@captcha');
// 注册路由...
Route::get('auth/register', 'Auth\AuthController@getRegister');
Route::post('auth/register', 'Auth\AuthController@postRegister');